package com.qk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 课程实体类
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("course")
public class Course {
    @TableId(value="id", type= IdType.AUTO)
    private Integer id; //  课程id

    @TableField("subject")
    private Integer subject; //  课程所属学科

    @TableField("name")
    private String name; //  课程名称

    @TableField("price")
    private Integer price; //  课程价格

    @TableField("target")
    private Integer target; //  课程目标

    @TableField("description")
    private String description; //  课程描述

    @TableField("created")
    private LocalDateTime createTime; //  创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated")
    private LocalDateTime updateTime; //  修改时间 //创建时间
    
}